<link href="../Public/css/skin.css" rel="stylesheet" type="text/css" />
<link href="../Public/css/Dialogbox.css" rel="stylesheet"	type="text/css" />
<script language="javascript" src="../Public/js/jquery-1.4.3.min.js"></script>
<script language="javascript" src="../Public/js/core.js"></script>
<script language="javascript"	src="../Public/js/jquery.checkboxes.min.js"></script>
<script language="javascript" src="../Public/js/checkboxes.js"></script>
<script language="javascript" src="../Public/js/Dialogbox.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />


<title>商品竞拍列表</title>

<style type="text/css">
	body {
		margin-left: 0px;
		margin-top: 0px;
		margin-right: 0px;
		margin-bottom: 0px;
		background-color: #EEF2FB;
	}
</style>



<script type="text/javascript">
	var IMGPATH="../Public/images/";

	function viewrobots(id) {
		addDialogbox("#viewrobots", "机器人选择", 10001, 860);
		$.ajax({
			url : "__APP__/Auction/viewRobots/id/" + id + "/",
			cache : false,
			type : "POST",
			success : function(msg) {
				$("#viewrobots .dialogboxContent").html(msg);
			}
		});
	}

	function saveRobot() {
		var string = $('#robot').formSerialize();
		$.ajax({
			url : "__APP__/Auction/saveRobots",
			data : string,
			cache : false,
			type : "POST",
			success : function(msg) {
				removeDialogbox("#viewrobots");
			}
		});
	}
</script>



<body>
	<table width="100%" border="0" cellpadding="0" cellspacing="0">
		<tr>
			<td width="17" valign="top"
				background="../Public/images/mail_leftbg.gif"><img
				src="../Public/images/left-top-right.gif" width="17" height="29" />
			</td>
			<td valign="top" background="../Public/images/content-bg.gif">
				<table width="100%" height="31" border="0" cellpadding="0" cellspacing="0" class="left_topbg" id="table2">
					<tr>
						<td height="31"><div class="titlebt">竞拍列表</div>
						</td>
					</tr>
				</table>
			</td>
			<td width="16" valign="top"
				background="../Public/images/mail_rightbg.gif"><img
				src="../Public/images/nav-right-bg.gif" width="16" height="29" />
			</td>
		</tr>
		<tr>
			<td valign="middle" background="../Public/images/mail_leftbg.gif">&nbsp;</td>
			<td valign="top" bgcolor="#F7F8F9">
				<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
					<tr>
						<td valign="top" class="td_top">
							<div>
								<a href="javascript:list.submit();" class="operation_dels"></a>   <!-- 删除添加和检索 -->
								<a href="__URL__/add" class="operation_add"></a>
								
								<form method="post" id="search" action="__URL__/index">
									<a href="javascript:search.submit();" id="submit" class="search_submit"></a> 
										商品名称: <input type="text" id="goodsname" name="goodsname" value="{$goodsname}" class="search_input" />
								</form>
								
							</div>
						</td>
					</tr>
					<tr>
						<td>
							
							<form method="post" id="list" action="__URL__/dels">
								<table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#CCCCCC" class="content">
									<tr class="tr_title">
										<td width=5%>
											<input type="checkbox" name="checkbox" value="checkbox" id="selectAll">
										</td>
										<td width="5%">ID</td>
										<td width="25%">商品名称</td>
										<td width="8%">保价价格</td>
										<td width="15%">开始时间</td>
										<td width="8%">时间幅度</td>
										<td width="8%">价格幅度</td>
										<td width="5%">消耗</td>
										<td width="5%">推荐</td>
										<td width="8%">竞拍状态</td>
										<td width="8%">机器人</td>
										<td width="15%">操作</td>
									</tr>
									
									<iterate name="auctiondata" id="v">
									<tr class="tr_content">
										<td>
											<input type="checkbox" name="ids[]" value="{$v.id}" class="option_checkbox">
										</td>
										<td>{$v.id}</td>
										<td>{$v.goodsname}</td>
										<td>{$v.goodsprice}</td>
										<td>{$v.starttime|date="Y-m-d H:i:s",###}</td>
										<td>{$v.addsecond}</td>
										<td>{$v.addprice}</td>
										<td>{$v.usebeat}</td>
										
										<td>
											<if condition="$v.recommend eq 1">
													<span style="color: red;">是</span>
											<else/>
													<span>否</span>
											</if>		 
										</td>
										<td>
											<if condition="$v.state eq 0">
												 <span>未开始</span>
											<elseif condition="$v.state eq 1" /> 
												<span>进行中</span>
											 <elseif condition="$v.state eq 2" /> 
												<span>已结束</span> 
											<elseif condition="$v.state eq 3" />
												 <span>已产生订单</span>
											 </if>
										</td>
										
										
										<td>
											<if condition="$v.robots eq 0">
												 <span style="color: red;">未设置</span>
											<else/>	
												 <span>已设置</span>
											 </if>
										</td>
										
										
										
										<td align="center">
											<div style="width: 190px">
												<a class="operation_robot" href="javascript:viewrobots({$v.id});"></a>   <!-- 设置竞拍机器人 -->
												<a class="operation_edit" href="__URL__/edit/id/{$v.id}"></a>   <!-- 修改和删除 -->
												<a class="operation_del" href="__URL__/del/id/{$v.id}"></a>
											</div>
										</td>
									</tr>
									</iterate>
								</table>
							</form>
							
							
						</td>
					</tr>
					<tr>
						<td height="20"><div class="page">{$page}</div>
						</td>
					</tr>
					<tr>
						<td height="40"></td>
					</tr>
					<tr>
						<td width="51%" class="left_txt"><img
							src="../Public/images/icon-mail2.gif" width="16" height="11">
							客户服务邮箱：{$Think.config.sysconfig.services_email}<br> <img
							src="../Public/images/icon-phone.gif" width="17" height="14">
							官方网站：{$Think.config.sysconfig.website}</td>
					</tr>
				</table>
			</td>
			<td background="../Public/images/mail_rightbg.gif">&nbsp;</td>
		</tr>
		<tr>
			<td valign="bottom" background="../Public/images/mail_leftbg.gif"><img
				src="../Public/images/buttom_left2.gif" width="17" height="17" />
			</td>
			<td background="../Public/images/buttom_bgs.gif"><img
				src="../Public/images/buttom_bgs.gif" width="17" height="17">
			</td>
			<td valign="bottom" background="../Public/images/mail_rightbg.gif"><img
				src="../Public/images/buttom_right2.gif" width="16" height="17" />
			</td>
		</tr>
	</table>
</body>
